<?php
if($_GET['mode']=="delete"){
   $delete_art = mysql_query('DELETE FROM termin_user WHERE id='.$_GET['id'].'');
   echo '<meta http-equiv="refresh" content="0;url=check.php?mode=termins">';
}
if($_POST['hide1']!=57) echo "";
	else {
	   $termin_name = $_POST['termin_name'];
	   $termin_descr = $_POST['termin_descr'];
	   $date_added = $_POST['date_added'];
	   $tutorial = $_POST['to_tutorial'];
	   $from_who = $_POST['from_who'];
	   $cat = $_POST['cat'];

	   $insert = mysql_query('INSERT INTO termin(term, term_descr, cat, date_added, from_who, module)
	   VALUES("'.$termin_name.'", "'.$termin_descr.'", "'.$cat.'", '.$date_added.', "'.$from_who.'", "'.$tutorial.'")');

	   $delete=mysql_query('DELETE FROM termin_user WHERE termin="'.$termin_name.'"');
	   echo '<meta http-equiv="refresh" content="0;url=check.php?mode=termins">';
	}
?>